<!-- 我的表格 -->

<template>
  <WebTable class="MenuList-MyTable">
    <RowIndex />

    <RowTitle label="菜单名称" bind="name" />

    <RowTree label="所属模块" bind="moduleId" :dict="GETTER.groupModule" allName minWidth="100" />

    <RowNum label="排序" bind="sort" />

    <RowPhoto v-if="!CORE.MAP.MENU_LIST_NO_ICON && CORE.THEME.home !== 'none'" label="图标" bind="icon">
      <template #default="{ row }">
        <div v-if="/^el-icon/.test(row.icon)"><i :class="row.icon" /></div>
      </template>
    </RowPhoto>

    <RowDict label="打开方式" bind="openType" :dict="DICT.TYPE" />

    <RowTree label="目录 / 链接" bind="catalogue" :dict="route_treeDict" allName :minWidth="180">
      <template #default="{ row, text }">
        <span v-if="row.openType === 1">{{ text }}</span>
        <el-link v-else :href="row.landingPage" :underline="false" type="primary" target="_blank">
          {{ row.landingPage }}
        </el-link>
      </template>
    </RowTree>

    <RowText label="备注" bind="remark" minWidth="120" />

    <RowOperate />
  </WebTable>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'

// ============================== 导出组件 ============================== //

export default {
  /**
   * 名称定义 (实际使用名称)
   */
  name: 'MyTable',

  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [CORE.mixWeb(), CORE.mixTree('route', 'route_')],
}
</script>

<style lang="scss">
@import './index.scss';
</style>
